<template>
  <div class="low-app-home-button" v-on="$listeners">
    <div class="context" :style="{backgroundColor: backColor}">
      <div class="icon">
        <slot name="icon"/>
      </div>
      <div class="title">
        <slot/>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HomeButton',
  props: {
    backColor: String,
  },
}
</script>

<style lang="less" scoped>
.low-app-home-button {
  width: 200px;
  height: 240px;
  margin-right: 36px;
  background-color: white;
  display: inline-block;
  cursor: pointer;
  text-align: center;
  vertical-align: top;
  padding: 10px;
  box-shadow: 0 0 6px 0 #ccc;
  transform: scale(1);
  transition: box-shadow 0.1s, transform 0.3s;

  &:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px 0 #ccc;
  }

  .context {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #e3f1ff;
  }

  .icon {
    margin-bottom: 18px;

    .anticon {
      font-size: 64px;
    }
  }

  .title {
    font-size: 18px;
    font-weight: bold;
  }

  &:last-child {
    margin-right: 0;
  }
}
</style>